const express=require('express')
const app=express();
//导入cors解决跨域问题
const cors=require('cors')
app.use(cors());
//导入路由模块儿
const userRouter=require('./router/user')
//注册路由模块
app.use('/api',userRouter);
//配置post解析中间件
app.use(express.urlencoded({ extended:false}));

app.listen(80,(req,res)=>{
    console.log('server running at http://127.0.0.1');
})

